package org.lanqiao.tjut.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.lanqiao.tjut.bean.UsersBeanTea;
import org.lanqiao.tjut.myUtils.MyUtils;
import org.lanqiao.tjut.service.ServiceFactory;

public class UserTeacherRevise  extends HttpServlet {
	private static final long serialVersionUID = 1L;  
	
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
	request.setCharacterEncoding("UTF-8");
	
	UsersBeanTea usersBT=new UsersBeanTea();
	
	//获取修改命令
	usersBT.setOpt(MyUtils.obj2Int(request.getParameter("opt")));
	
	usersBT.setTeanum(request.getParameter("userNum"));
	usersBT.setCouid(MyUtils.obj2Int(request.getParameter("couid")));
    
	//查询课程信息
	UsersBeanTea lstTeaCou = ServiceFactory.getUserInfoManagerTeaServiceInstance().getTeaCou(usersBT);
	
	
	request.setAttribute("lstTeaCou", lstTeaCou);
	//?????????????????
	//request.setAttribute("lstTeaCou", lstTeaCou);
	// 清空request缓存中的对象
	
	// 转发到结果显示页面
	request.getRequestDispatcher("logined/UserInfoManager/userTeaAdd.jsp").forward(request, response);
	// response.sendRedirect("logined/UserInfoManager/userInfoAddDetail.jsp");
	
	

	
	}
}
